package so.wy.servicecenter.businessbed.service.hospital.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import so.wy.servicecenter.businessbed.dao.rdb.hospital.hospital_building.HospitalBuildingDO;

import java.util.List;

/**
* @author wdl
* @date 2020-04-08
*/
@Data
@NoArgsConstructor
public class HospitalBuildingTreeDTO {

	/** 主键ID */
	private Long id;
	/** 医院ID */
	private Long hospitalId;
	/** 父ID */
	private Long parentId;
	/** 是否父节点 */
	private Integer isNode;
	/** 当前level */
	private Integer level;
	/** 名称 */
	private String name;
	/** 楼栋ID */
	private Long buildingId;
	/** 楼栋名称 */
	private String buildingName;
	/** 楼层ID */
	private Long floorId;
	/** 楼层名称 */
	private String floorName;
	/** 排序 */
	private Integer sortNum;

	private List<HospitalBuildingTreeDTO> children;

	public HospitalBuildingTreeDTO(HospitalBuildingDO hospitalBuildingDO){
		if(hospitalBuildingDO==null){
			return ;
		}

		this.id = hospitalBuildingDO.getId();
		this.hospitalId = hospitalBuildingDO.getHospitalId();
		this.parentId = hospitalBuildingDO.getParentId();
		this.isNode = hospitalBuildingDO.getIsNode();
		this.level = hospitalBuildingDO.getLevel();
		this.name = hospitalBuildingDO.getName();
		this.buildingId = hospitalBuildingDO.getBuildingId();
		this.buildingName = hospitalBuildingDO.getBuildingName();
		this.floorId = hospitalBuildingDO.getFloorId();
		this.floorName = hospitalBuildingDO.getFloorName();
		this.sortNum = hospitalBuildingDO.getSortNum();
	}



}
